import request from '@/utils/request';

/**
 * 获取种类
 * @returns 
 */
export function getCategory(){
    return request({
        url: '/biz/productCategory/getList',
        method: 'get',
      })
}

/**
 * 新增菜单
 * @param {*} category 
 * @returns 
 */
export function addMenu(category){
  return request({
    url: '/biz/productCategory/addCategory',
    method: 'post',
    data: category
  })
}

/**
 * 修改菜单
 * @param {*} category 
 * @returns 
 */
export function updateMenu(category){
  return request({
    url: '/biz/productCategory/updateCategory',
    method: 'put',
    data: category
  })
}

/**
 * 删除菜单
 * @param {*} id 
 * @returns 
 */
export function delMenu(id){
  return request({
    url: '/biz/productCategory/delCategory',
    method: 'delete',
    params:{
      id
    }
  })
}



